package com.group2.equipment.service.blockhandler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.group2.equipment.utils.Result;

/**
 * @author binghan
 * @version 1.0
 * @description: TODO 方法出现异常 熔断降级
 * @date 2022/6/7 10:16
 */
public class BlockHandlerService {

    /**
     * 查询未知异常熔断服务
     * @return
     */
    public static Result queryBlockHandler(BlockException bE) {
        Result res = new Result();
        res.setError();
        res.setMessage("查询出现位置已被流控，熔断降级:"+bE.getRule());
        res.setData(null);
        return res;
    }
}
